home *** CD-ROM | disk | FTP | other *** search
- Path: news.ccs.queensu.ca!qlink!3mal5
- From: 3mal5@qlink.queensu.ca (Lepage Marc A)
- Newsgroups: comp.lang.c++
- Subject: Callbacks using member functions
- Date: 16 Jan 1996 16:43:58 GMT
- Organization: Queen's University, Kingston
- Message-ID: <4dgkke$8mf@knot.queensu.ca>
- NNTP-Posting-Host: qlink.queensu.ca
- X-Newsreader: TIN [version 1.2 PL2]
-
- I am writing a MOTIF application, and I wish to use classes for the
- various elements of my program. MOTIF is C, and uses callbacks. I want
- to install member functions as the callbacks, but g++ complains, I
- suspect because of the implicit 'this' parameter. Is there a way to get
- this to work (ie, why can't the compiler straighten everything out)?
-
- I expect that I cannot use a member function as a callback, but wish to
- confirm this before I go ahead and start using friend functions.
-
- So on a related note, if I use friends, what is the best way to make sure
- I have access to the proper class instances, without the 'this' parameter?
-
- Does anyone have any recommendations to structuring MOTIF applications
- with C++, and an object-oriented approach?
-
- --
- Wintermute
-